Process and intermediates for the preparation of the thienopyrrole derivatives

ABSTRACT

A process for preparing a compound of formula (I) where R 4  and R 5  are as defined in the specification; and R 6  is hydrogen or a protecting group, which process comprises cyclisation of a compound of formula (II) where R 4 , R 5  and R 6  are as defined in relation to formula (I), and R 7  is nitrogen-protecting group, and removing the group R 7 —, and thereafter if desired or necessary, removing any protecting group R 6  to obtain the corresponding carboxylic acid. Novel intermediates and the use of the products in the preparation of pharmaceutical compounds is also described and claimed.

RELATED APPLICATIONS

This application is a national stage filing under 35 U.S.C. 371 of International Application PCT/GB2003/004217, filed Sep. 29, 2003, which claims priority from United Kingdom Patent Applications No. 0222912.8, filed Oct. 3, 2002, the specifications of each of which are incorporated by reference herein. International Application PCT/GB2003/004217 was published under PCT Article 21(2) in English.

The present invention relates to a novel process for preparing intermediates for therapeutically effective compounds, together with novel intermediates for use in the process.

Compounds with glycogen phosphorylase activity are described in WO 02/20530. These compounds have a general formula which may be represented as formula (A)

where X, Y and Z is selected from inter alia —CR⁴═CR⁵—S—, R⁴ and R⁵ are independently selected from hydrogen, halo, nitro, cyano, hydroxy, fluoromethyl, difluoromethyl, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆alkyl)₂carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N,—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino and C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino; n is 0-4, and R¹, R² and R³ are various specified organic groups.

These compounds are generally prepared by a reacting an acid of formula (B)

with an appropriate amine. Acids of formula (B) are prepared according to the following scheme:

However, this process is difficult to effect as it may proceed explosively.

The applicants have found an improved process for the production of certain intermediates.

The present invention provides a process for preparing a compound of formula (I)

where R⁴ and R⁵ are independently selected from hydrogen, halo, nitro, cyano, hydroxy, fluoromethyl, difluoromethyl, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆alkyl)₂carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N,—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino and C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino; and R⁶ is hydrogen or a protecting group, which process comprises cyclisation of a compound of formula (II)

where R⁴, R⁵ and R⁶ are as defined in relation to formula (I) and R⁷ is a nitrogen-protecting group, and removing protecting group R⁷, and thereafter if desired or necessary, removing any protecting group R⁶ to obtain the corresponding carboxylic acid.

Cyclisation is suitably effected in an organic solvent such as methanol or dimethylformamide (DMF) in the presence of a base. Suitable bases include particularly strong bases such as an alkali metal alkoxide, for instance sodium methoxide, but also weaker bases such as alkali metal carbonates like potassium carbonate. The reaction is suitably carried out at a broad range of temperatures, for example of from ambient temperature to 70° C., and conveniently at the reflux temperature of the solvent. Under these conditions, R⁷ is generally removed in the same reaction step. Depending upon the nature of the group employed however, it might be necessary to remove R⁷ in a subsequent step, for example by acid or base hydrolysis reactions.

Acid hydrolysis reactions may be carried out using conventional methods, and in particular using acids such as trifluoromethanesulphonic acid, acetic acid or hydrochloric acid. Base hydrolysis reactions are suitably effected in the presence of bases, such as alkali metal hydroxides, and in particular sodium or potassium hydroxide.

Suitable example of protecting groups R⁷ are listed in T. W. Green, Protecting Groups in Organic Synthesis, J. Wiley and Sons, 1991 and in particular are those designated as nitrogen-protection groups.

Particular examples of protecting groups R⁷ are groups of sub-formula (i)

where R⁸ is a hydrocarbyl or heterocyclic group, either of which may be optionally substituted.

As used herein, the expression “hydrocarbyl” includes any structure comprising carbon and hydrogen atoms. For example, these may be alkyl, alkenyl, alkynyl, aryl such as phenyl or napthyl, arylalkyl such as benzyl, or cycloalkyl, cycloalkenyl or cycloalkynyl. Suitably hydrocarbyl groups contain up to 20 and preferably up to 10 carbon atoms.

The term “aryl” refers to aromatic rings such as phenyl or naphthyl.

The term “heterocyclic” includes aromatic or non-aromatic rings, for example containing from 4 to 20, suitably from 5 to 8 ring atoms, at least one of which, and suitably from 1 to 4 of which is a heteroatom such as oxygen, sulphur or nitrogen. They may be monocyclic or have fused rings, such a bicyclic or tricyclic ring systems. Examples of such groups include furyl, thienyl, pyrrolyl, pyrrolidinyl, imidazolyl, triazolyl, thiazolyl, tetrazolyl, oxazolyl, isoxazolyl, piperidinyl, pyrazolyl, pyridyl, pyrimidinyl, pyrazinyl, pyridazinyl, triazinyl, quinolinyl, isoquinolinyl, quinoxalinyl, benzothiazolyl, benzoxazolyl, benzothienyl or benzofuryl.

The term “heteroaryl” refers to heterocyclic groups which are aromatic in nature. Thus these may comprises cyclic aromatic hydrocarbons in which one or more carbon atoms have been replaced with a heteroatom. If the heteroaryl group contains more than one heteroatom, the heteroatoms may be the same or different. Examples of heteroaryl groups include pyridyl, pyrimidinyl, imidazolyl, thienyl, furyl, pyrazinyl, pyrrolyl, pyranyl, isobenzofuranyl, chromenyl, xanthenyl, indolyl, isoindolyl, indolizinyl, triazolyl, pyridazinyl, indazolyl, purinyl, quniolizinyl, isoquinolyl, quinolyl phthalazinyl, naphthyridinyl, quinoxalinyl, isothiazolyl and benzo[b]thienyl. Preferred heteroaryl groups are five or six membered rings and contain from one to three heteroatoms.

Suitable optional substituents for heterocyclic and hydrocarbyl groups R⁸ include nitro, cyano, halo, oxo, ═CR¹³R¹⁴, C(O)_(x)R¹², OR¹², S(O)_(y)R¹², NR¹³R¹⁴, C(O)NR¹³R¹⁴, OC(O)NR¹³R¹⁴, ═NOR¹², —NR¹²C(O)_(x)R¹³, —NR¹²CONR¹³R¹⁴, —N═CR¹³R¹⁴, S(O)_(y)NR¹³R¹⁴ or —NR¹²S(O)_(y)R¹³ where R¹², R¹³ and R¹⁴ are independently selected from hydrogen or optionally substituted hydrocarbyl, or R¹³ and R¹⁴ together form an optionally substituted ring which optionally contains further heteroatoms such as S(O)_(y) oxygen and nitrogen, x is an integer of 1 or 2, y is 0 or an integer of 1-3. Hydrocarbyl groups R⁸ may also include heterocyclic substituents, which may themselves be optionally substituted by one or more of the optional substituents listed above. Heterocyclic groups may also be substituted with hydrocarbyl groups which may also be optionally substituted by any of the groups listed above.

Preferably R⁸ is a hydrocarbyl group such as alkyl, aryl or arylalkyl. Most preferably R⁸ is a straight chain alkyl group of from 1 to 6 carbon atoms, and particularly is a straight chain C₁₋₄alkyl group, such as methyl.

Particular examples of groups R⁴ and R⁵ are hydrogen, halo, nitro, cyano, fluoromethyl, difluoromethyl, trifluoromethyl, trifluoromethoxy, carboxy, carbamoyl, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl and C₁₋₆alkanoyloxy.

Suitably R⁴ and R⁵ are independently selected from hydrogen, halo, nitro, cyano, fluoromethyl, difluoromethyl, trifluoromethyl, trifluoromethoxy, carboxy, carbamoyl, sulphamoyl, C₁₋₄alkyl, C₂₋₄alkenyl, C₂₋₄alkynyl, C₁₋₄alkoxy, C₁₋₄alkanoyl, and C₁₋₄alkanoyloxy.

Preferably R⁴ and R⁵ are independently selected from hydrogen and halogen such as chlorine, fluorine and bromine, and in particular chlorine.

Most preferably R⁴ is hydrogen and R⁵ is halogen such as chlorine.

Particular examples of protecting groups R⁶ are any organic groups which can be removed by hydrogenation or hydrolysis. These include optionally substituted hydrocarbyl or optionally substituted heterocyclic groups. Such groups may be similar to those listed above in relation to R⁷.

Suitable example of protecting groups R⁶ are also listed in T. W. Green, Protecting Groups in Organic Synthesis, J. Wiley and Sons, 1991 and in particular are those designated as acid protecting groups.

In particular R⁶ is a hydrocarbyl group such as C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, aryl such as phenyl, or arylalkyl such as benzyl.

Conversion of a protecting group R⁶ to hydrogen is suitably effected using conventional methods, for example as described in WO 02/20530. In particular, the compound is reacted with a base such as lithium hydroxide, in an organic solvent such as methanol, at temperatures of from 20-80° C., and conveniently at the reflux temperature of the solvent.

Compounds of formula (II) are suitably prepared by reacting a compound of formula (III)

where R⁴ and R⁵ are as defined in relation to formula (I), and R⁶ and R⁷ are as defined in relation to formula (II), with a compound of formula (IV): LCH₂COOR⁶  (IV) where L is a leaving group such as halogen and in particular bromine. The reaction is suitably effected in the presence of a base in an organic solvent such as dimethylformamide, N-methylpyrrolidone (NMP) or acetone. Suitable bases include alkali metal carbonates, bicarbonates, hydroxides, or methoxides, but are preferably weak bases such as alkali metal carbonates or bicarbonates, for instance potassium bicarbonate. The reaction may be conducted at elevated temperatures, for example of from 30 to 100° C. depending on the solvent used. For example when dimethylformamide is the solvent, the reaction is preferably carried out from 50 to 70° C. and most preferably at about 60° C. When NMP is the solvent, the reaction may be carried out from 30 to 50° C., preferably at about 40° C.

Compounds of formula (III) are suitably prepared by formylation of a compound of formula (V)

where R⁴ and R⁵ are as defined above in relation to formula (I) and R⁷ is as defined above in relation to formula (II). This can be carried out using conventional methods such as the Vilsmeier-Haack reaction. In this reaction, the compound of formula (V) is reacted with a formyl containing reagent such as a compound of formula (VI)

where R⁹ and R¹⁰ are independently selected from phenyl and alkyl groups (in particular lower alkyl groups of 1 to 4 carbon atoms, such as methyl) in the presence of phosphorus oxychloride. The reaction is suitably effected at moderate temperatures and conveniently at room temperature. The compound of formula (VI) may act as a solvent also, where it is for example, DMF, alternatively a different organic solvent may be used, such as dichloromethane.

The applicants have found however that under some conditions this reaction produces a significant proportion of an amidine of formula (VII)

where R⁴ and R⁵ are as defined in relation to formula (I) and R⁹ and R¹⁰ are as defined in relation to formula (VI). A compound of formula (VII) may be converted to a compound of formula (III) by reaction with a compound of formula (VIII) (R⁷)₂O  (VIII) where R⁷ are as defined in relation to formula (II), under acidic conditions, for example in a solvent comprising an organic acid, such as acetic acid. Elevated temperatures for example of from 80-150° C. and preferably from 110-130° C. are employed. Conveniently the reaction may be effected at the reflux temperature of the solvent. Particular examples of compounds of formula (VIII) are those where groups R⁷ are groups of sub-formula (i) as defined above, and in particular where R⁸ is methyl, so that the compound of formula (VIII) is acetic anhydride.

Generally, where the compound of the formula (V) is reacted with the formyl containing compound of the formula (VI) using a solvent such as dichloromethane, an amidine of formula (VII) is not formed in significant quantities, and the desired compound of the formula (III) is instead obtained in good yield.

Compounds of formula (V) are suitably prepared by reacting a compound of formula (IX)

where R⁴ and R⁵ are as defined above in relation to formula (I), and R¹¹O(C═O) is a labile nitrogen-protecting group, with a compound of formula (VIII) as defined above, under acidic conditions, for example in a solvent comprising an organic acid, such as acetic acid. Elevated temperatures for example of from 80-150° C. and preferably from 110-130° C. are employed. Conveniently the reaction may be effected at the reflux temperature of the solvent.

Suitable labile nitrogen protecting groups for R¹¹O(C═O) include tertiary-butoxy carbonyl groups, or benzyloxycarbonyl groups.

Compounds of formula (IX) are either known (see for example Binder et al., Synthesis, (1977, (4) 255-6) or can be prepared from known compounds. In particular, compounds of formula (IX) are suitably prepared by subjecting a compound of formula (X)

where R⁴ and R⁵ are as defined in relation to formula (I), to a Curtius rearrangement reaction, in the presence of an alcohol of formula R¹¹OH. In this reaction, the compound of formula (X) is reacted with an diphenylphosphorylazide, to convert the acid group to a carbonyl azide, which is thermally decomposed to the amide via an isocyanate. Suitable reaction conditions are illustrated hereinafter.

Compounds of formula (II), (III) and (VII) are novel and form further aspects of the invention.

Compounds of formula (IV), (V), (VI), (VIII), (IX) and (X) are known compounds or they can be prepared from known compounds by conventional methods.

Compounds of formula (I) are suitably used in the production of pharmaceutical compounds and in particular, compounds with glycogen phosphorylase activity as described in WO 02/20530 and EP-A-1088824.

Thus in a further aspect, the invention provides a method as described above, for the production of a compound of formula (I) where R⁶ is hydrogen, and further comprising reacting the compound of formula (I) obtained with an amine of formula (XI),

where R¹⁴ is selected from hydrogen or C₁₋₈alkyl,

-   m is an integer of from 0 to 4, -   each R¹⁵ is the same or different and is selected from hydrogen,     halo, nitro, cyano, hydroxy, amino, carboxy, carbamoyl, mercapto,     sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy,     C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino,     N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl,     N,N—(C₁₋₄alkyl)₂carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2,     C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino,     N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl,     C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino,     C₃₋₈cycloalkyl, C₃₋₈cycloalkylC₁₋₆alkyl, aryl, arylC₁₋₆alkyl,     heterocyclic group and (heterocyclic group)C₁₋₆alkyl; wherein R¹⁵     may be optionally substituted on carbon by one or more groups     selected from P and wherein if said heterocyclic group contains an     —NH— moiety that nitrogen may be optionally substituted by a group     selected from R;

each R¹⁶ is the same or different and is selected from hydrogen and C₁₋₆alkyl;

R¹⁷ is selected from hydrogen, halo, nitro, cyano, hydroxy, fluoromethyl, difluoromethyl, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₄alkyl)₂carbamoyl, N—(C₁₋₆alkyl)-N—(C₁₋₆alkoxy)carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, sulphamoylamino, N—(C₁₋₆alkyl)sulphamoylamino, N,N—(C₁₋₆alkyl)₂sulphamoylamino, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonylaminocarbonyl, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino and a group -E-F-G-H;

wherein E and G are independently selected from a direct bond, —O—, —S—, —SO—, —SO₂—, —OC(O)—, —C(O)O—, —C(O)—, —NR^(a)—, —NR^(a)C(O)—, —C(O)NR^(a)—, —SO₂NR^(a)—, —NR^(a)SO₂—, —NR^(a)C(O)NR^(b)—, —OC(O)NR^(a)—, —NR^(a)C(O)O—, —NR^(a)SO₂NR^(b)—, —SO₂NR^(a)C(O)— and —C(O)NR^(a)SO₂—; wherein R^(a) and R^(b) are independently selected from hydrogen and C₁₋₆alkyl which is optionally substituted by a group V;

F is C₁₋₆alkylene optionally substituted by one or more Q or a direct bond;

H is selected from aryl, C₃₋₈cycloalkyl and heterocyclic group; wherein H may be optionally substituted on carbon by one or more groups selected from S and wherein if said heterocyclic group contains an —NH— moiety that nitrogen may be optionally substituted by a group selected from T;

P, S and Q are independently selected from halo, nitro, cyano, hydroxy, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆alkyl)₂carbamoyl, N—(C₁₋₆alkyl)-N—(C₁₋₆alkoxy)carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino, C₃₋₈cycloalkyl, aryl and heterocyclic group; wherein P, S and Q may be optionally and independently substituted on carbon by one or more groups selected from V and wherein if said heterocyclic group contains an —NH— moiety that nitrogen may be optionally substituted by a group selected from U;

V is selected from halo, nitro, cyano, hydroxy, trifluoromethoxy, trifluoromethyl, amino, carboxy, carbamoyl, mercapto, sulphamoyl, methyl, ethyl, methoxy, ethoxy, acetyl, acetoxy, methylamino, ethylamino, dimethylamino, diethylamino, N-methyl-N-ethylamino, acetylamino, N-methylcarbamoyl, N-ethylcarbamoyl, N,N-dimethylcarbamoyl, N,N-diethylcarbamoyl, N-methyl-N-ethylcarbamoyl, methylthio, ethylthio, methylsulphinyl, ethylsulphinyl, mesyl, ethylsulphonyl, methoxycarbonyl, ethoxycarbonyl, N-methylsulphamoyl, N-ethylsulphamoyl, N,N-dimethylsulphamoyl, N,N-diethylsulphamoyl, N-methyl-N-ethylsulphamoyl, morpholino, morpholinocarbonyl, N-benzylcarbamoyl, and 4-hydroxypiperidinocarbonyl;

R, T and U are independently selected from C₁₋₄alkyl, C₁₋₄alkanoyl, C₁₋₄alkylsulphonyl, C₁₋₄alkoxycarbonyl, carbamoyl, N—(C₁₋₄alkyl)carbamoyl, N,N—(C₁₋₄alkyl)carbamoyl, phenyl, benzyl, benzyloxycarbonyl, benzoyl and phenylsulphonyl wherein R, T and U may be optionally and independently substituted on carbon by one or more groups selected from V;

to produce a compound of formula (XII)

where R⁴, R⁵, R¹⁵, R¹⁶, R¹⁷ and m are as defined above, or a pharmaceutically acceptable salt or an in vivo hydrolysable ester thereof.

Particular examples of compounds of formula (XII) are compounds where R¹⁴ is hydrogen, as described in WO 02/20530. For instance, suitable compounds of formula (XII) are compounds where R⁴ and R⁵ are as defined above, R¹⁴ is hydrogen, m is 0 and R¹⁷ is a group -E-F-G-H;

wherein E, F and G are each a direct bond;

H is a C₃₋₁₂cycloalkyl which is optionally fused to a benz ring wherein H may be optionally substituted on carbon by one or more groups S which are independently selected from halo, nitro, cyano, hydroxy, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆alkyl)2carbamoyl, N—(C₁₋₆alkyl)-N—(C₁₋₆alkoxy)carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino, C₃₋₈cycloalkyl, aryl and heterocyclic groups; wherein S may be optionally substituted on carbon by one or more groups selected from V;

V is selected from halo, nitro, cyano, hydroxy, trifluoromethoxy, trifluoromethyl, amino, carboxy, carbamoyl, mercapto, sulphamoyl, methyl, ethyl, methoxy, ethoxy, acetyl, acetoxy, methylamino, ethylamino, dimethylamino, diethylamino, N-methyl-N-ethylamino, acetylamino, N-methylcarbamoyl, N-ethylcarbamoyl, N,N-dimethylcarbamoyl, N,N-diethylcarbamoyl, N-methyl-N-ethylcarbamoyl, methylthio, ethylthio, methylsulphinyl, ethylsulphinyl, mesyl, ethylsulphonyl, methoxycarbonyl, ethoxycarbonyl, N-methylsulphamoyl, N-ethylsulphamoyl, N,N-dimethylsulphamoyl, N,N-diethylsulphamoyl, N-methyl-N-ethylsulphamoyl, morpholino, morpholinocarbonyl, N-benzylcarbamoyl, and 4-hydroxypiperidinocarbonyl;

or a pharmaceutically acceptable salt thereof.

Other suitable compounds of formula (XII) are compounds where R⁴ and R⁵ are as defined above, R¹⁴ is hydrogen, m is 0, and R¹⁷ is a group -E-F-G-H;

wherein E, F and G are each a direct bond; and

H is a cyclic amide of formula

in which the point of attachment is the carbon atom adjacent to the carbonyl group, k is 0, 1 or 2 and 1 is 0, 1 or 2 such that the sum of (k+1) is 1, 2 or 3 and wherein one of the carbon atoms governed by k or 1 may be replaced by sulphur and wherein H is optionally substituted on the carbon atom adjacent to the aromatic ring by a group selected from S and may be independently optionally substituted on nitrogen by a group selected from T;

S is selected from halo, nitro, cyano, hydroxy, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆alkyl)₂carbamoyl, N—(C₁₋₆alkyl)-N—(C₁₋₆alkoxy)carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino, C₃₋₈cycloalkyl, aryl and heterocyclic group; wherein S may be optionally and independently substituted on carbon by one or more groups selected from V and wherein if said heterocyclic group contains an —NH— moiety that nitrogen may be optionally substituted by a group selected from U;

T and U are independently selected from C₁₋₄alkyl, C₁₋₄alkanoyl, C₁₋₄alkylsulphonyl, C₁₋₄alkoxycarbonyl, carbamoyl, N—(C₁₋₄alkyl)carbamoyl, N,N—(C₁₋₄alkyl)carbamoyl, phenyl, benzyl, benzyloxycarbonyl, benzoyl and phenylsulphonyl wherein R, T and U may be optionally and independently substituted on carbon by one or more groups selected from V;

V is selected from halo, nitro, cyano, hydroxy, trifluoromethoxy, trifluoromethyl, amino, carboxy, carbamoyl, mercapto, sulphamoyl, methyl, ethyl, methoxy, ethoxy, acetyl, acetoxy, methylamino, ethylamino, dimethylamino, diethylamino, N-methyl-N-ethylamino, acetylamino, N-methylcarbamoyl, N-ethylcarbamoyl, N,N-dimethylcarbamoyl, N,N-diethylcarbamoyl, N-methyl-N-ethylcarbamoyl, methylthio, ethylthio, methylsulphinyl, ethylsulphinyl, mesyl, ethylsulphonyl, methoxycarbonyl, ethoxycarbonyl, N-methylsulphamoyl, N-ethylsulphamoyl, N,N-dimethylsulphamoyl, N,N-diethylsulphamoyl, N-methyl-N-ethylsulphamoyl, morpholino, morpholinocarbonyl, N- benzylcarbamoyl and 4-hydroxypiperidinocarbonyl;

or a pharmaceutically acceptable salt or an in vivo hydrolysable ester thereof.

Yet further examples of compounds of formula (XII) are compounds where R¹⁴ is hydrogen, and wherein R⁴ and R⁵ are independently selected from hydrogen, halo or C₁₋₆alkyl,

m is 1; R¹⁵ is hydrogen or arylC₁₋₆alkyl, R¹⁶ is hydrogen or C₁₋₆alkyl, and R¹⁷ is selected from a group -E-F-G-H; wherein E, F and G are each a direct bond;

H is an unsaturated five membered heterocyclic group containing at least one nitrogen atom and one or two ring atoms selected from oxygen and sulphur and wherein H may be optionally substituted on carbon by one or more groups S which are independently selected from halo, nitro, cyano, hydroxy, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆allyl)₂carbamoyl, N—(C₁₋₆alkyl)-N—(C₁₋₆alkoxy)carbamoyl, C₁₋₆allylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆allyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino, C₃₋₈cycloalkyl and aryl groups;

or a pharmaceutically acceptable salt thereof.

Other particular examples include compounds of formula (XII) where R¹⁴ is hydrogen, R⁴ and R⁵ are independently selected from hydrogen, halo or C₁₋₆alkyl.

m is 0; and R¹⁷ is a group -E-F-G-H;

wherein E is a direct bond;

F is methylene;

wherein G is —C(O)NR^(a)—, wherein R^(a) is selected from hydrogen or C₁₋₆alkyl which is optionally substituted by a group V;

H is aryl which may be optionally substituted on carbon by one or more groups selected from S;

S is selected from halo, nitro, cyano, hydroxy, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆alkyl)₂carbamoyl, N—(C₁₋₆alkyl)-N—(C₁₋₆alkoxy)carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino, C₃₋₈cycloalkyl, aryl and heterocyclic group; wherein S may be optionally and independently substituted on carbon by one or more groups selected from V;

-   V is selected from halo, nitro, cyano, hydroxy, trifluoromethoxy,     trifluoromethyl, amino, carboxy, carbamoyl, mercapto, sulphamoyl,     methyl, ethyl, methoxy, ethoxy, acetyl, acetoxy, methylamino,     ethylamino, dimethylamino, diethylamino, N-methyl-N-ethylamino,     acetylamino, N-methylcarbamoyl, N-ethylcarbamoyl,     N,N-dimethylcarbamoyl, N,N-diethylcarbamoyl,     N-methyl-N-ethylcarbamoyl, methylthio, ethylthio, methylsulphinyl,     ethylsulphinyl, mesyl, ethylsulphonyl, methoxycarbonyl,     ethoxycarbonyl, N-methylsulphamoyl, N-ethylsulphamoyl,     N,N-dimethylsulphamoyl, N,N-diethylsulphamoyl,     N-methyl-N-ethylsulphamoyl, morpholino, morpholinocarbonyl,     N-benzylcarbamoyl, and 4-hydroxypiperidinocarbonyl;     or a pharmaceutically acceptable salt thereof.

Other particular compounds of formula (XII) are compounds where the group

is a group of sub-formula (ii)

where R¹⁴ is as defined above, R¹⁸ is aryl, substituted aryl, heteroaryl, or substituted heteroaryl, R¹⁹ is a bond or a group —CH(OH)—, and R²⁰ is a group —C(═O)-A or a group —CH(OH)—C(═O)-A in which A is NR^(d)R^(d), —NR^(a)CH₂CH₂OR^(a), or

-   each R^(a) and R^(b) is independently hydrogen or —C₁-C₈alkyl; -   each R^(d) is independently hydrogen, C₁-C₈alkyl, C₁-C₈alkoxy, aryl,     substituted aryl, heteroaryl, or substituted heteroaryl; -   each R^(c) is independently hydrogen, —C(═O)OR^(a), —OR^(a),     —SR^(a), or —NR^(a)R^(a); and each n is independently 1-3, and -   X¹ is NR^(a), —CH₂—, O or S.

Examples of substituents for aryl and heteroaryl groups Q and R^(d) include halogen, C₁₋₈alkoxy, C₁₋₈alkyl, trifluoromethyl, amino, mono or di-(C₁₋₈alkyl)amino, nitro, cyano, carboxy or C₁₋₈alkyl esters thereof.

The invention will now be particularly described by way of example, in which, unless stated otherwise:

-   (i) temperatures are given in degrees Celsius (° C.); operations     were carried out at room or ambient temperature, that is, at a     temperature in the range of 18-25° C. and under an atmosphere of an     inert gas such as argon; -   (ii) organic solutions were dried over anhydrous magnesium sulphate;     evaporation of solvent was carried out using a rotary evaporator     under reduced pressure (600-4000 Pascals; 4.5-30 mmHg) with a bath     temperature of up to 60° C.; -   (iii) chromatography means flash chromatography on silica gel; thin     layer chromatography (TLC) was carried out on silica gel plates; -   (iv) in general, the course of reactions was followed by TLC and     reaction times are given for illustration only; -   (v) yields are given for illustration only and are not necessarily     those which can be obtained by diligent process development;     preparations were repeated if more material was required; -   (vi) where given, NMR data is in the form of delta values for major     diagnostic protons, given in parts per million (ppm) relative to     tetramethylsilane (TMS) as an internal standard, determined at 300     MHz using perdeuterio dimethyl sulphoxide (DMSO-d₆) as solvent or     other solvents (where indicated in the text) including deuterated     chloroform CDCl₃; -   (vii) chemical symbols have their usual meanings; SI units and     symbols are used; -   (viii) reduced pressures are given as absolute pressures in Pascals     (Pa); elevated pressures are given as gauge pressures in bars; -   (ix) solvent ratios are given in volume: volume (v/v) terms; -   (x) mass spectra (MS) were run with an electron energy of 70     electron volts in the chemical ionisation (CI) mode using a direct     exposure probe; where indicated ionisation was effected by electron     impact (EI), fast atom bombardment (FAB) or electrospray (ESP);     values for m/z are given; generally, only ions which indicate the     parent mass are reported and unless otherwise stated the value     quoted is (M−H)⁻;

The following abbreviations are used:

-   DMSO=dimethylsulfoxide -   DCM=dichloromethane -   TBF is tetrahydrofuran -   HPLC is high performance liquid chromatography -   DMP is dimethylformamide -   TBF is tetrahydrofuran -   LCMS is liquid chromatography/mass spectrometry

EXAMPLE 1

Step 1

Under argon, 5-chlorothiophene-2-carboxylic acid (5.48 g) was dissolved in warm dry tertiary butanol (34 ml) and triethylamine (4.7 ml) added followed by diphenylphosphorylazide (DPPA) (7.26 ml). The mixture was then heated slowly to reflux and refluxed for about 12 hours.

The reaction mixture was then cooled and poured into H₂O (˜180 ml). The resultant dark suspension was filtered, and the solid was washed with H₂O then dried under suction to a brown powder. This was dissolved in diethyl ether and the solution dried over MgSO₄, filtered and evaporated to the desired product, tert-butyl (5-chloro-2-thienyl)carbamate, as a dark brown solid (Yield=6.75 g).

¹H NMR (400 MHz, d⁶-DMSO) 6.82 (d, 1H), 6.34 (d, 1H), 1.50 (s, 9H)

Step 2

A mixture of acetic anhydride (6.42 ml) in acetic acid (60 ml) was added to the product from step 1 (7.48 g) and the resultant mixture heated at 120° C. for 4 hours. On cooling the reaction mixture was poured into water and extracted with EtOAc. The EtOAc layer was washed with saturated aqueous K₂CO₃, dried over Na₂SO₄, filtered and evaporated under reduced pressure to give a black solid. Chromatography through silica using an eluent of CH₂Cl₂ to Et₂O gave N-(5-chloro-2-thienyl)acetamide (4.63 g, 83%) as a pale brown solid. ¹H NMR (400 MHz, d⁶-DMSO) 11.33 (br s, 1H), 6.82 (d, 1H), 6.40 (d, 1H), 2.05 (s, 3H); ESP⁻ 174.29

Step 3

The product from step 2 (1.09 g) was dissolved in dimethyl formamide (DMF) (3 ml) and cooled in an ice bath. POCl₃ (0.58 ml) was added dropwise and the dark mixture stirred at 0° C. for 30 minutes then allowed to warm to room temperature, and stirred at room temperature for 64 hours.

The reaction mixture was poured into ice water and the aqueous phase was extracted into dichloromethane. The dichloromethane layer was dried over MgSO₄, filtered and evaporated to a black gum. Purification was effected by suction column chromatography though silica using hexane as initial eluent and CH₂Cl₂ to apply the material to the top of the column. The concentration of diethyl ether was slowly increased (10% jumps) to neat diethyl ether. Several fractions were analysed by LCMS. The 2 fractions which had (MH)+ at 217 and (MH)⁻ at 202 were combined. They were evaporated to give a yellow solid (0.53 g). Spectral analysis both by LCMS and ¹H NMR showed that this was a mixture of the desired N-(5-chloro-3-formyl-2-thienyl)acetamide (87%) and N′-(5-chloro-3-formyl-2-thienyl)-N,N-dimethylimidoformamide (13%).

¹H NMR N-(5-chloro-3-formyl-2-thienyl)acetamide (300 MHz, d⁶-DMSO) 11.65 (br s, 1H), 9.93 (s, 1H), 7.22 (s, 1H), 2.25 (s, 3); ESP⁻ 202.21;

N′-(5-chloro-3-formyl-2-thienyl)-N,N-dimethylimidoformamide (300 MHz , d⁶-DMSO) 9.90 (s, 1H), 7.97 (s, 1H), 6.93 (s, 1H), 3.13 (s, 3H), 3.02 (s, 3H); ESP⁺ 217.22

Step 4

The mixture from Step 3 (0.53 g) was dissolved in acetic acid (5 ml) and to this was added acetic anhydride (0.5 ml) followed by H₂O (0.25 ml). The mixture was heated to reflux for approximately 1 hour whereupon tlc analysis indicated that none of the dimethyl amidine derivative remained.

The reaction mixture was poured into H₂O and the precipitate filtered. The aqueous phase was extracted into a mixture of dichloromethane and methanol in a ratio of 19:1 and the precipitate was dissolved in a similar mixture. The combined organic solutions were washed with dilute aqueous potassium carbonate, ensuring that the pH remained at about 12, then dried over MgSO₄. Filtration and evaporation under reduced pressure gave the desired product, N-(5-chloro-3-formyl-2-thienyl)acetamide, as a yellow, orange solid (Yield=0.53 g).

¹H NMR (300 MHz, d⁶-DMSO) 11.65 (br s, 1H), 9.93 (s, 1H), 7.22 (s, 1H), 2.25 (s, 3H); ESP⁻ 202.21

Alternative Step 3 (Removing Need for Step 4)

Dichloromethane (7 ml), POCl₃ (2.24 ml) and DMF (3.10 ml) were stirred at room temperature for 15 minutes to form a clear solution. The product from step 2 (3.50 g) was dissolved in dichloromethane (70 ml) and added via syringe pump to the POCl₃/DMF solution over a period of 1.5 hours to form a dark solution. The reaction was stirred at room temperature for 23 hours. Saturated sodium bicarbonate (200 ml) was added gradually to the reaction mixture, until pH 8 was obtained. The organic phase was separated and sodium hydroxide (1M, 150 ml and 2M, 100 ml) was added slowly to the solution in an ice bath, until pH 14 was obtained. The aqueous layers were combined and hydrochloric acid (2M, 150 ml) was added until pH 3 was obtained. The product was extracted into ethyl acetate (150 ml) and washed with brine (25 ml). The solvent was evaporated to give N-(5-chloro-3-formyl-2-thienyl)acetamide (2.09 g, 52%) as a dark grey solid.

¹H NMR (400 MHz, CDCl₃) 11.37 (br s, 1H), 9.69 (s, 1H), 7.01 (s, 1H), 2.31 (s, 1H)

Step 5

The product from Step 4 (460 mg) was placed under argon, in dry glassware, and dissolved in dry DMF (2 ml). Potassium bicarbonate (567 mg) was added to the solution followed by methylbromoacetate (0.54 ml). The mixture was heated to 40° C. for 150 mins, and then at 60° C. for a further 120 mins. The reaction was stirred at room temperature overnight at again heated at 60° C. for 270 minutes on the next day.

The product was partitioned between dichloromethane and water and the dichloromethane layer was dried over MgSO₄, filtered and evaporated under reduced pressure to give a dark oil. This was purified by suction column chromatography through silica using hexane as initial eluent and CH₂Cl₂ to apply the material to the top of the column. The concentration of CH₂Cl₂ was increased (10% increments, 50 ml fractions) to 100% CH₂Cl₂, held at CH₂Cl₂ for a few fractions then the concentration of Et₂O increases (1% increments) until the spots were removed from the column. The spot corresponding to the desired methyl N-acetyl-N-(5-chloro-3-formyl-2-thienyl)glycinate (identified using LCMS) was collected for use in the subsequent step.

¹H NMR (300 MHz, d⁶-DMSO) 9.93 (s, 1H), 7.20 (s, 1H), 4.40 (br s, 2H), 3.77 (s, 3H), 2.06 (s, 3H).

Alternative Step 5

The product from Step 4 (1.50 g) was placed under argon, in dry glassware, and dissolved in dry NMP (10 ml). Potassium bicarbonate (2.96 g) was added to the solution followed by NMP (5 ml), methyl-bromoacetate (2.79 ml) and tert-butyl methyl ether (0.5 ml). The mixture was heated to 40° C. for 23 hours. The product was partitioned between EtOAc and water and the EtOAc layer was dried over MgSO₄, filtered and evaporated under reduced pressure to give an orange oil. This was purified by suction column chromatography through silica using CH₂Cl₂ as initial eluent and to apply the material to the top of the column. The concentration of Et₂O increased (0.25% increments) to give after evaporation the product methyl N-acetyl-N-(5-chloro-3-formyl-2-thienyl)glycinate (1.20 g, 59%) as a clear, yellow gum.

¹H NMR (300 MHz, d⁶-DMSO) 9.93 (s, 1H), 7.20 (s, 1H), 4.40 (br s, 2H), 3.77 (s, 3H), 2.06 (s, 3H)

Step 6

The product from Step 5 (170 mg) was dissolved in MeOH under an argon atmosphere, and a solution of sodium methoxide in methanol (0.62 ml of 25% solution) added causing a slight darkening to a brown, clear solution. The mixture was refluxed for about 1 hour.

The reaction mixture was partitioned between dichloromethane and water, and the dichloromethane layer was dried over MgSO₄, filtered and evaporated under reduced pressure to give the desired product, methyl 2-chloro-6H-thieno[2,3-b]pyrrole-5-carboxylate as a yellow solid (Yield=97 mgs (93%). The structure was confirmed by LCMS and ¹HNMR spectroscopy. ¹H NMR (300 MHz, d⁶-DMSO) 9.40 (br s, 1H), 6.91 (s, 1H), 6.82 (s, 1H), 3.82 (s, 3H); ESP⁻ 214.16

Alternative Step 6

The product from Step 5 (1.20 g) was dissolved in DMF (15 ml), K₂CO₃ (631 mg) added and the mixture heated to 60° C. for 90 minutes. On cooling to room temperature the mixture was poured into water (30 ml) and the white solid filtered off and washed with water to give the desired product, methyl 2-chloro-6H-thieno[2,3-b]pyrrole-5-carboxylate (741 mg, 79%) as an off white solid. ¹H NMR (300 MHz, d⁶-DMSO) 9.40 (br s, 1H), 6.91 (s, 1H), 6.82 (s, 1H), 3.82 (s, 3H); ESP⁻ 214.16 

1. A process for preparing a compound of formula (I)

wherein R⁴ and R⁵ are independently selected from hydrogen, halo, nitro, cyano, hydroxy, fluoromethyl, difluoromethyl, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆alkyl)₂carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N,—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino, and C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino; and R⁶ is hydrogen or a protecting group, which process comprises cyclisation of a compound of formula (II)

wherein R⁴, R⁵, and R⁶ are as defined in relation to formula (I); and R⁷ is a nitrogen protecting group; and removing protecting group R⁷, and thereafter if desired or necessary, removing any protecting group R⁶ to obtain the corresponding carboxylic acid.
 2. A process according to claim 1, wherein the protecting group R⁷ is removed during the cyclisation.
 3. A process according to claim 1, wherein in a structure of formula (II), R⁷ is a group of sub-formula (i)

wherein R⁸ is a straight chain alkyl group of from 1 to 6 carbon atoms.
 4. A process according to claim 1, wherein R⁴ and R⁵ are independently selected from hydrogen, halo, nitro, cyano, fluoromethyl, difluoromethyl, trifluoromethyl, trifluoromethoxy, carboxy, carbamoyl, sulphamoyl, C₁₋₄alkyl, C₂₋₄alkenyl, C₂₋₄alkynyl, C₁₋₄alkoxy, C₁₋₄alkanoyl, and C₁₋₄alkanoyloxy.
 5. A method according to claim 1, for the production of a second compound of formula (I) where R⁶ is hydrogen, further comprising reacting a first compound of formula (I) with an amine of formula (Xl),

where R¹⁴ is selected from hydrogen and C₁₋₈alkyl; m is an integer of from 0 to 4; each R¹⁵ is the same or different and is selected from hydrogen, halo, nitro, cyano, hydroxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₄alkyl)₂carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino, C₃₋₈cycloalkyl, C₃₋₈cycloalkylC₁₋₆alkyl, aryl, arylC₁₋₆alkyl, heterocyclic group, and (heterocyclic group)C₁₋₆alkyl; wherein R¹⁵ may be optionally substituted on carbon with one or more P groups, and if said heterocyclic group contains an —NH— moiety, that nitrogen may be optionally substituted with an R group; each R¹⁶ is the same or different and is selected from hydrogen and C₁₋₆alkyl; R¹⁷ is selected from hydrogen, halo, nitro, cyano, hydroxy, fluoromethyl, difluoromethyl, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₄alkyl)₂carbamoyl, N—(C₁₋₆alkyl)-N—(C₁₋₆alkoxy)carbamoyl, C₁₋₆alkylS(O)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, sulphamoylamino, N—(C₁₋₆alkyl)sulphamoylamino, N,N—(C₁₋₆alkyl)₂sulphamoylamino, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonylaminocarbonyl, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino, and a group -E-F-G-H; E and G are independently selected from a direct bond, —O—, —S—, —SOS—, —SO₂—, —OC(O)—, —C(O)O—, —C(O)—, —NR^(a)—, —NR^(a)C(O)—, —C(O)NR^(a)—, —SO₂NR^(a)—, —NR^(a)SO₂—, —NR^(a)C(O)NR^(b)—, —OC(O)NR^(a)—, —NR^(a)C(O)O—, —NR^(a)SO₂NR^(b)—, —SO₂NR^(a)C(O)—, and —C(O)NR^(a)SO₂—; R^(a) and R^(b) are independently selected from hydrogen and C₁₋₆alkyl which is optionally substituted with a V group; F is C₁₋₆alkylene optionally substituted by one or more Q or a direct bond; H is selected from aryl, C₃₋₈cycloalkyl, and heterocyclic group; wherein H may be optionally substituted on carbon with one or more S groups, and if said heterocyclic group contains an —NH— moiety, that nitrogen may be optionally substituted with a T group; P, S, and Q are independently selected from halo, nitro, cyano, hydroxy, trifluoromethyl, trifluoromethoxy, amino, carboxy, carbamoyl, mercapto, sulphamoyl, ureido, C₁₋₆alkyl, C₂₋₆alkenyl, C₂₋₆alkynyl, C₁₋₆alkoxy, C₁₋₆alkanoyl, C₁₋₆alkanoyloxy, N—(C₁₋₆alkyl)amino, N,N—(C₁₋₆alkyl)₂amino, C₁₋₆alkanoylamino, N—(C₁₋₆alkyl)carbamoyl, N,N—(C₁₋₆alkyl)₂carbamoyl, N—(C₁₋₆alkyl)-N—(C₁₋₆alkoxy)carbamoyl, C₁₋₆alkylS(0)_(a) wherein a is 0 to 2, C₁₋₆alkoxycarbonyl, C₁₋₆alkoxycarbonylamino, N—(C₁₋₆alkyl)sulphamoyl, N,N—(C₁₋₆alkyl)₂sulphamoyl, C₁₋₆alkylsulphonylamino, C₁₋₆alkylsulphonyl-N—(C₁₋₆alkyl)amino, C₃₋₈cycloalkyl, aryl, and heterocyclic group; wherein P, S, and Q may be optionally independently substituted on carbon with one or more V groups and if said heterocyclic group contains an —NH— moiety, that nitrogen may be optionally substituted by a U group; V is selected from halo, nitro, cyano, hydroxy, trifluoromethoxy, trifluoromethyl, amino, carboxy, carbamoyl, mercapto, sulphamoyl, methyl, ethyl, methoxy, ethoxy, acetyl, acetoxy, methylamino, ethylamino, dimethylamino, diethylamino, N-methyl-N-ethylamino, acetylamino, N-methylcarbamoyl, N-ethylcarbamoyl, N,N-dimethylcarbamoyl, N,N-diethylcarbamoyl, N-methyl-N-ethylcarbamoyl, methyithia, ethyithia, methylsuiphinyl, ethylsuiphinyl, mesyl, ethylsuiphonyl, methoxycarbonyl, ethoxycarbonyl, N-methylsulphamoyl, N-ethylsulphamoyl, N,N-dimethylsulphamoyl, N,N-diethylsulphamoyl, N-methyl-N-ethylsulphamoyl, morpholino, morpholinocarbonyl, N- benzylcarbamoyl, and 4-hydroxypiperidinocarbonyl; R, T, and U are independently selected from C₁₋₄alkyl, C₁₋₄alkanoyl, C₁₋₄alkylsulphonyl, C₁₋₄alkoxycarbonyl, carbamoyl, N—(C₁₋₄alkyl)carbamoyl, N,N—(C₁₋₄alkyl)carbamoyl, phenyl, benzyl, benzyloxycarbonyl, benzoyl, and phenylsulphonyl; wherein R, T, and U may be optionally independently substituted on carbon with one or more V groups; to produce a compound of formula (XII)

where R⁴, R⁵, R¹⁵, R¹⁶, R¹⁷, and m are as defined above, or a pharmaceutically acceptable salt or an in vivo hydrolysable ester thereof. 